package com.itmayiedu.api.service;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 演示swagger
 * @author: liucancan
 * @create: 2018-11-27 15:46
 */
@Api("控制器功能名称-swagger演示")
@RestController
public class SwaggerController {

    @ApiOperation("接口名称")
    @GetMapping("/swaggerIndex")
    public String getSwagger() {
        return "测试";
    }

    @ApiOperation("带参数接口")
    @ApiImplicitParam(name = "userName", value = "用户信息名称", required = true, type = "String")
    @GetMapping("/paramSwaggerIndex")
    public String paramSwaggerIndex(String userName) {
        return userName;
    }
}
